package acadclockmidletpkg;

import java.util.Date;
import javax.microedition.lcdui.DateField;
import javax.microedition.lcdui.TextField;

/**
 * Инкапсулирует поля данных записи базы данных.
 *
 * @author kgp
 */
public final class AcademicClockRecord {

    //TODO Попробовать определить начала пар в масси!!!
    private DateField firstSemesterBegin;
    private DateField secondSemesterBegin;
    private TextField pairDuration;
    private DateField firstPairBegin;
    private DateField secondPairBegin;
    private DateField thirdPairBegin;
    private DateField fourthPairBegin;
    private DateField fifthPairBegin;
    private DateField sixthPairBegin;
    private DateField seventhPairBegin;
    private DateField eighthPairBegin;
    private DateField ninethPairBegin;

    public AcademicClockRecord() {
        //Создание значений по умолчанию
        //Даты
        DateField currentDate = new DateField("", DateField.DATE);
        Date cd=new Date(System.currentTimeMillis());
        currentDate.setDate(cd);
        System.out.println("Current date is "+currentDate.getDate().getTime());
        //Времени - показывает -7200000
//        DateField currentTime = currentDate;
//        currentTime.setInputMode(DateField.TIME);
//        System.out.println("Current time is "+currentTime.getDate().getTime());
        //Продолжительности пары
        TextField defaultPairDuration = new TextField("", "75", 3, 0);
        //Установка значений по-умолчанию
        setFirstSemesterBegin(currentDate);
        setSecondSemesterBegin(currentDate);
        setPairDuration(defaultPairDuration);
        setFirstPairBegin(currentDate);
        setSecondPairBegin(currentDate);
        setThirdPairBegin(currentDate);
        setFourthPairBegin(currentDate);
        setFifthPairBegin(currentDate);
        setSixthPairBegin(currentDate);
        setSeventhPairBegin(currentDate);
        setEighthPairBegin(currentDate);
        setNinethPairBegin(currentDate);
    }

    public DateField getFirstSemesterBegin() {
        return firstSemesterBegin;
    }

    public void setFirstSemesterBegin(DateField firstSemesterBegin) {
        this.firstSemesterBegin = firstSemesterBegin;
    }

    public DateField getSecondSemesterBegin() {
        return secondSemesterBegin;
    }

    public void setSecondSemesterBegin(DateField secondSemesterBegin) {
        this.secondSemesterBegin = secondSemesterBegin;
    }

    public TextField getPairDuration() {
        return pairDuration;
    }

    public void setPairDuration(TextField pairDuration) {
        this.pairDuration = pairDuration;
    }

    public DateField getFirstPairBegin() {
        return firstPairBegin;
    }

    public void setFirstPairBegin(DateField firstPairBegin) {
        this.firstPairBegin = firstPairBegin;
    }

    public DateField getSecondPairBegin() {
        return secondPairBegin;
    }

    public void setSecondPairBegin(DateField secondPairBegin) {
        this.secondPairBegin = secondPairBegin;
    }

    public DateField getThirdPairBegin() {
        return thirdPairBegin;
    }

    public void setThirdPairBegin(DateField thirdPairBegin) {
        this.thirdPairBegin = thirdPairBegin;
    }

    public DateField getFourthPairBegin() {
        return fourthPairBegin;
    }

    public void setFourthPairBegin(DateField fourthPairBegin) {
        this.fourthPairBegin = fourthPairBegin;
    }

    public DateField getFifthPairBegin() {
        return fifthPairBegin;
    }

    public void setFifthPairBegin(DateField fifthPairBegin) {
        this.fifthPairBegin = fifthPairBegin;
    }

    public DateField getSixthPairBegin() {
        return sixthPairBegin;
    }

    public void setSixthPairBegin(DateField sixthPairBegin) {
        this.sixthPairBegin = sixthPairBegin;
    }

    public DateField getSeventhPairBegin() {
        return seventhPairBegin;
    }

    public void setSeventhPairBegin(DateField seventhPairBegin) {
        this.seventhPairBegin = seventhPairBegin;
    }

    public DateField getEighthPairBegin() {
        return eighthPairBegin;
    }

    public void setEighthPairBegin(DateField eighthPairBegin) {
        this.eighthPairBegin = eighthPairBegin;
    }

    public DateField getNinethPairBegin() {
        return ninethPairBegin;
    }

    public void setNinethPairBegin(DateField ninethPairBegin) {
        this.ninethPairBegin = ninethPairBegin;
    }
}
